/****************************************************************




****************************************************************/

#include "stdafx.h"




#include "myClientProtocolInterface.h"


namespace myFn
{
	long myClientInterface::_bindProtocol(myProtocolInterface *protocol)
	{
		if (!m_protocol)
		{
			m_protocol = protocol;
			if (m_protocol)
			{
				m_protocol->_bindClient(this);
				return 1;
			}
		}
		return 0;
	};
	long myClientInterface::_unBindProtocol()
	{
		if (m_protocol)
		{
			m_protocol->_unBindClient();
			m_protocol = 0;
			return 1;
		}
		m_protocol = 0;
		return 0;
	}
	long myClientInterface::_chgProtocol(myProtocolInterface *newProtocol)
	{
		_unBindProtocol();
		return _bindProtocol(newProtocol);
	};


};//myFn




